﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Web.Enhancements.Rest
{
    [Serializable()]
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class PropertyWebBinding : Attribute
    {
        /// <summary>
        /// Gets or sets the property mapping name to a form variable. 
        /// </summary>
        public string MappingName { get; set; }
        /// <summary>
        /// Gets or sets a boolean value indicated whether property is required. 
        /// </summary>
        public bool IsRequired { get; set; }

        /// <summary>
        /// Default constructor.
        /// </summary>
        public PropertyWebBinding()
            : base()
        {
            this.IsRequired = false;
            this.MappingName = "";
        }
    }
}
